package com.tuling.logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by chenhs on 2018/7/25.
 */
public class HelloSpringLogger {
    private static Logger logger = LoggerFactory.getLogger(HelloSpringLogger.class);

    public static void main(String[] args) {

       //spring的日志
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
        context.start();
        context.getBean(HelloSpringLogger.class);

        //slf4j日志
        logger.error("slf4j - error - abcd");
        logger.info("slf4j - info - abcd");
    }
}
